<?php

namespace App\Transformers\Personnel;

use League\Fractal\TransformerAbstract;
use App\Models\Personnel\StationClass;

/**
 * Class StationClassTransformer
 * @package namespace App\Transformers\Personnel;
 */
class StationClassTransformer extends TransformerAbstract
{

    /**
     * Transform the \StationClass entity
     * @param \StationClass $model
     *
     * @return array
     */
    public function transform(StationClass $model)
    {
        return [
            'id'         => (int) $model->id,
            'name'       => $model->name,
            'created_at' => $model->created_at->format('Y-m-d H:i:s'),
            'updated_at' => $model->updated_at->format('Y-m-d H:i:s')
        ];
    }
}
